#1 ✓resolved
Rick DeNatale

Occurrence Lists not picking up TimeWithZone identifier

Reported by Rick DeNatale | May 19th, 2009 @ 12:39 PM | in 0.0.8

This was reported by Adam Williams

The problem now is exdate:

Given s is a Series, which has_many Event::Exceptions (a model which represents changes to Event instances):

    s.exceptions.each do |e|
      exception_date_time = Time.zone.local(
        e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
        s.originating_event.starts_at.hour,
        s.originating_event.starts_at.min)
      ievent.add_exdate exception_date_time
      ical.event do |ievent_exception|
        build_event(ievent_exception, Event::Occurrence.new(s,

e.occurs_on, e))

      end unless e.deletion?
    end

As you can see, I am utilizing Time.zone to create an
ActiveSupport::TimeWithZone instance that has the same date as the
Event::Exception, but the hour and minute of the originating Event in
the Series. It is my understanding that this is how exdate works - the
exact date and time in the recurrence that is an exception to the rrule.

Here is what is produced:

BEGIN:VEVENT EXDATE:20081126T183000Z DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000 DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000 RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su END:VEVENT

Notice that the EXDATE is not respecting the time zone of the
ActiveSupport::TimeWithZone instance.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences

Shared Ticket Bins

People watching this ticket

Pages